package com.example.demo.thread.state;

/**
 * @Author: liull
 * @Description:
 * @Date: Created in 14:15 2020/5/29
 * @Modified By:
 */
public class InterruptTest4 {
    public static void main(String[] args) throws InterruptedException {
        MyThread3 thread = new MyThread3();
        thread.start();
        //        Thread.sleep(2000);
        MyThread3 thread2 = new MyThread3();
        thread2.start();
        Thread.sleep(1000);
        System.out.println(thread.getState());
        System.out.println(thread2.getState());
        thread2.interrupt();
        System.out.println(thread2.isInterrupted());
        System.out.println(thread2.getState());
    }
}
